package com.jeeplus.test.jlnu.degreeInfo.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.test.jlnu.admissionInfo.domain.entity.AllInfo;
import com.jeeplus.test.jlnu.archivalInfo.domain.entity.ArchParmerter;
import com.jeeplus.test.jlnu.degreeInfo.domain.entity.DegreeInfo;
import com.jeeplus.test.jlnu.degreeInfo.service.DegreeInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "学位信息")
@RestController
@Slf4j
@RequestMapping("/degreeInfo")
public class DegreeInfoController {

    @Autowired
    private DegreeInfoService degreeInfoService;

    @ApiOperation("学位信息分页查询")
    @GetMapping("/page")
    public Page<DegreeInfo> getDegreeInfoPage(ArchParmerter degreeInfoReqVo, @RequestParam(defaultValue = "1") int pageNum,
                                              @RequestParam(defaultValue = "10") int pageSize) {
        Page<DegreeInfo> page = new Page<>(pageNum, pageSize);
        Page<DegreeInfo> pageResult = degreeInfoService.getDegreeInfoPage(degreeInfoReqVo, page);
        return pageResult;
    }

}
